<WITD application="Work item type editor" version="1.0">
  <WORKITEMTYPE name="Issue">
    <DESCRIPTION>Includes information to track changes through the MSF for CMMI Process Improvement life cycle.</DESCRIPTION>
    <FIELDS>
      <FIELD name="Id" refname="System.Id" type="Integer">
      </FIELD>
      <FIELD name="Title" refname="System.Title" type="String">
		  <HELPTEXT>Short description of the issue used to differentiate it in a list or report</HELPTEXT>
        <REQUIRED/>
      </FIELD>
      <FIELD name="Assigned To" refname="System.AssignedTo" type="String">
        <VALIDUSER/>
      </FIELD>
      <FIELD name="History" refname="System.History" type="History">
		  <HELPTEXT>Discussion thread and other historical information</HELPTEXT>
      </FIELD>
      <FIELD name="Area Path" refname="System.AreaPath" type="TreePath">
        <HELPTEXT>The area of the product with which this issue is associated</HELPTEXT>
      </FIELD>
      <FIELD name="Iteration Path" refname="System.IterationPath" type="TreePath">
		  <HELPTEXT>The iteration of the product with which this issue is associated</HELPTEXT>
      </FIELD>
      <FIELD name="State" refname="System.State" type="String">
        <HELPTEXT>The workflow state of the issue</HELPTEXT>
      </FIELD>
      <FIELD name="Reason" refname="System.Reason" type="String">
		  <HELPTEXT>The reason why the issue is in the current state</HELPTEXT>
      </FIELD>
      <FIELD name="Changed Date" refname="System.ChangedDate" type="DateTime">
      </FIELD>
      <FIELD name="Changed By" refname="System.ChangedBy" type="String">
        <VALIDUSER/>
      </FIELD>
      <FIELD name="Created Date" refname="System.CreatedDate" type="DateTime">
      </FIELD>
      <FIELD name="Created By" refname="System.CreatedBy" type="String">
      </FIELD>
      <FIELD name="Description" refname="System.Description" type="PlainText">
      </FIELD>
      <!-- *************** Common Fields ****************   -->
      <FIELD name="Issue" refname="Microsoft.VSTS.Common.Issue" type="String" reportable="dimension">
		  <HELPTEXT>Used to highlight the work item, e.g., to mark it as an issue.</HELPTEXT>
        <REQUIRED/>
        <ALLOWEDVALUES>
          <LISTITEM value="Yes"/>
          <LISTITEM value="No"/>
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="No"/>
      </FIELD>      
      <FIELD name="State Change Date" refname="Microsoft.VSTS.Common.StateChangeDate" type="DateTime">
        <WHENCHANGED field="System.State">
          <SERVERDEFAULT from="clock"/>
        </WHENCHANGED>
        <WHENNOTCHANGED field="System.State">
          <READONLY/>
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Activated Date" refname="Microsoft.VSTS.Common.ActivatedDate" type="DateTime" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY/>
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Activated By" refname="Microsoft.VSTS.Common.ActivatedBy" type="String" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY/>
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Resolved Date" refname="Microsoft.VSTS.Common.ResolvedDate" type="DateTime" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY/>
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Resolved By" refname="Microsoft.VSTS.Common.ResolvedBy" type="String" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY/>
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Closed Date" refname="Microsoft.VSTS.Common.ClosedDate" type="DateTime" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY/>
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Closed By" refname="Microsoft.VSTS.Common.ClosedBy" type="String" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY/>
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Priority" refname="Microsoft.VSTS.Common.Priority" type="Integer" reportable="dimension">
        <HELPTEXT>Priority for addressing the issue, based on business goals</HELPTEXT>
        <REQUIRED/>
        <ALLOWEDVALUES>
          <LISTITEM value="1"/>
          <LISTITEM value="2"/>
          <LISTITEM value="3"/>
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="3"/>
      </FIELD>
      <FIELD name="Triage" refname="Microsoft.VSTS.Common.Triage" type="String" reportable="dimension">
		  <HELPTEXT>Status of triaging the issue</HELPTEXT>
        <REQUIRED/>
        <ALLOWEDVALUES>
          <LISTITEM value="Pending"/>
          <LISTITEM value="More Info"/>
          <LISTITEM value="Info Recv"/>
          <LISTITEM value="Triaged"/>
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="Pending"/>
      </FIELD>
      <!-- **************** Build Integration Fields *******************************************  -->
      <FIELD name="Integration Build" refname="Microsoft.VSTS.Build.IntegrationBuild" type="String" reportable="dimension">
		  <HELPTEXT>The build in which the issue was resolved</HELPTEXT>
        <SUGGESTEDVALUES>
          <LISTITEM value="None"/>
        </SUGGESTEDVALUES>
      </FIELD>
      <!-- *************** MSF for CMMI PI Fields ****************   -->
      <FIELD name="Analysis" refname="Microsoft.VSTS.CMMI.Analysis" type="HTML">
        <HELPTEXT>The analysis of the issue including root cause identification and potential solutions</HELPTEXT>
      </FIELD>
      <FIELD name="Impact on Project Promise" refname="Microsoft.VSTS.CMMI.ImpactOnProjectPromise" type="String">
		  <HELPTEXT>The severity of the issue on customer expectations</HELPTEXT>
        <REQUIRED/>
        <ALLOWEDVALUES>
          <LISTITEM value="Critical"/>
          <LISTITEM value="High"/>
          <LISTITEM value="Medium"/>
          <LISTITEM value="Low"/>
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="Low"/>
      </FIELD>
      <FIELD name="Corrective Action Plan" refname="Microsoft.VSTS.CMMI.CorrectiveActionPlan" type="HTML">
      </FIELD>
      <FIELD name="Corrective Action Actual Resolution" refname="Microsoft.VSTS.CMMI.CorrectiveActionActualResolution" type="HTML">
      </FIELD>
      <FIELD name="Target Resolve Date" refname="Microsoft.VSTS.CMMI.TargetResolveDate" type="DateTime">
      </FIELD>
      <FIELD name="Escalate" refname="Microsoft.VSTS.CMMI.Escalate" type="String">
        <HELPTEXT>Used to flag an issue as critical</HELPTEXT>
        <ALLOWEDVALUES>
          <LISTITEM value="Yes"/>
          <LISTITEM value="No"/>
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="No"/>
      </FIELD>
    </FIELDS>
    <WORKFLOW>
      <STATES>
        <STATE value="Proposed">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
              <EMPTY/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
              <EMPTY/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <EMPTY/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <EMPTY/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <EMPTY/>
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Active">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
              <EMPTY/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
              <EMPTY/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <EMPTY/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <REQUIRED/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <REQUIRED/>
            </FIELD>
            <FIELD refname="System.AssignedTo">
              <REQUIRED/>
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Resolved">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <EMPTY/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
              <REQUIRED/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
              <REQUIRED/>
            </FIELD>
            <FIELD refname="System.AssignedTo">
              <REQUIRED/>
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Closed">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <REQUIRED/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <REQUIRED/>
            </FIELD>
            <FIELD refname="System.AssignedTo">
              <EMPTY/>
            </FIELD>
          </FIELDS>
        </STATE>
      </STATES>
      <TRANSITIONS>
        <TRANSITION from="" to="Proposed">
          <REASONS>
            <DEFAULTREASON value="New"/>
          </REASONS>
          <FIELDS>
            <FIELD refname="System.AssignedTo">
              <DEFAULT from="currentuser"/>
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Proposed" to="Active">
          <REASONS>
            <DEFAULTREASON value="Accepted"/>
            <REASON value="Investigate"/>
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <SERVERDEFAULT from="clock"/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <COPY from="currentuser"/>
              <VALIDUSER />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Active" to="Proposed">
          <REASONS>
            <DEFAULTREASON value="Investigation Complete"/>
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Active" to="Resolved">
          <REASONS>
            <DEFAULTREASON value="Resolved"/>
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
              <SERVERDEFAULT from="clock"/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
              <COPY from="currentuser"/>
              <VALIDUSER />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Active" to="Closed">
          <REASONS>
            <DEFAULTREASON value="Overtaken by Events"/>
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock"/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <COPY from="currentuser"/>
              <VALIDUSER />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Resolved" to="Active">
          <REASONS>
            <DEFAULTREASON value="Rework"/>
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <COPY from="currentuser"/>
              <VALIDUSER />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <SERVERDEFAULT from="clock"/>
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Resolved" to="Closed">
          <REASONS>
            <DEFAULTREASON value="Resolution Verified and Accepted"/>
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock"/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <COPY from="currentuser"/>
              <VALIDUSER />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Proposed" to="Closed">
          <REASONS>
            <DEFAULTREASON value="Rejected (not an issue)"/>
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock"/>
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <COPY from="currentuser"/>
              <VALIDUSER />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Closed" to="Active">
          <REASONS>
            <DEFAULTREASON value="Closed in Error"/>
            <REASON value="Re-opened"/>
            <REASON value="Re-occurred"/>
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <COPY from="currentuser"/>
              <VALIDUSER />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <SERVERDEFAULT from="clock"/>
            </FIELD>
            <FIELD refname="System.AssignedTo">
              <COPY from="field" field="Microsoft.VSTS.Common.ClosedBy"/>
            </FIELD>
          </FIELDS>
        </TRANSITION>
      </TRANSITIONS>
    </WORKFLOW>
    <FORM>
      <Layout>
        <Group>
          <Column PercentWidth="100">
            <Control Type="FieldControl" FieldName="System.Title" Label="&amp;Title:" LabelPosition="Left"/>
          </Column>
        </Group>
        <Group Label="Classification">
          <Column PercentWidth="100">
            <Control Type="WorkItemClassificationControl" FieldName="System.AreaPath" Label="&amp;Area path:" LabelPosition="Left"/>
            <Control Type="WorkItemClassificationControl" FieldName="System.IterationPath" Label="&amp;Iteration path:" LabelPosition="Left"/>
          </Column>
        </Group>
        <Group Label="Status">
          <Column PercentWidth="50">
            <Control Type="FieldControl" FieldName="System.AssignedTo" Label="Assi&amp;gned to:" LabelPosition="Left"/>
            <Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.Priority" Label="&amp;Priority:" LabelPosition="Left"/>
            <Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.Triage" Label="&amp;Triage:" LabelPosition="Left"/>
          </Column>
          <Column PercentWidth="50">
            <Control Type="FieldControl" FieldName="System.State" Label="&amp;State:" LabelPosition="Left"/>
            <Control Type="FieldControl" FieldName="System.Reason" Label="&amp;Reason:" LabelPosition="Left"/>
            <Control Type="FieldControl" FieldName="Microsoft.VSTS.CMMI.Escalate" Label="&amp;Escalate:" LabelPosition="Left"/>
          </Column>
        </Group>
        <TabGroup>
          <Tab Label="Description">
            <Control Type="HtmlFieldControl" FieldName="System.Description" Label="&amp;Description:" LabelPosition="Top" Dock="Fill"/>
          </Tab>
          <Tab Label="Analysis">
            <Group>
              <Column PercentWidth="100">
                <Control Type="FieldControl" FieldName="Microsoft.VSTS.CMMI.ImpactOnProjectPromise" Label="&amp;Impact on project promise:" LabelPosition="Left" Dock="Fill"/>
              </Column>
            </Group>
            <Group>
              <Column PercentWidth="100">
                <Control Type="HtmlFieldControl" FieldName="Microsoft.VSTS.CMMI.Analysis" Label="&amp;Analysis:" LabelPosition="Top" Dock="Fill"/>
              </Column>
            </Group>
          </Tab>
          <Tab Label="Corrective Action">
            <Control Type="HtmlFieldControl" FieldName="Microsoft.VSTS.CMMI.CorrectiveActionPlan" Label="&amp;Plan:" LabelPosition="Top"/>
            <Control Type="HtmlFieldControl" FieldName="Microsoft.VSTS.CMMI.CorrectiveActionActualResolution" Label="&amp;Actual resolution:" LabelPosition="Top" Dock="Fill"/>
          </Tab>
          <Tab Label="History">
            <Control Type="WorkItemLogControl" FieldName="System.History" Label="&amp;History:" LabelPosition="Top" Dock="Fill"/>
          </Tab>
          <Tab Label="Links">
            <Control Type="LinksControl"/>
          </Tab>
          <Tab Label="Attachments">
            <Control Type="AttachmentsControl"/>
          </Tab>
          <Tab Label="Details">
            <Group Label="Schedule">
              <Column PercentWidth="100">
                <Control Type="FieldControl" FieldName="Microsoft.VSTS.CMMI.TargetResolveDate" Label="&amp;Target resolve date:" LabelPosition="Left"/>
                <Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.ResolvedDate" Label="&amp;Actual resolved date:" LabelPosition="Left"/>
              </Column>
            </Group>
          </Tab>
        </TabGroup>
      </Layout>
    </FORM>
  </WORKITEMTYPE>
</WITD>
